package com.slipper.common.exception;

import com.slipper.common.constants.Constants;

public class CommonException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    private String code;
    private String message;
    private Throwable throwable;

    public CommonException(String message) {
        this.code = Constants.NO;
        this.message = message;
    }

    public CommonException(String message, Throwable throwable) {
        this.code = Constants.NO;
        this.message = message;
        this.throwable = throwable;
    }

    public CommonException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }
}
